<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>Chatlino</title>
    <%= stylesheet_link_tag *(['main'] + @stylesheets) %>
    <%= javascript_include_tag *(["yui/utilities/utilities", "ext/ext-yui-adapter", "ext/ext-all"]) %>
    <%= javascript_include_tag :defaults %>
    <%= javascript_include_tag "jsan/JSAN" %>
    <%= javascript_include_tag "jsan/DOM/Ready" %>
    <%= javascript_include_tag "jsan/DOM/Events" %>
    <%= javascript_include_tag "jsan/Effect/RoundedCorners" %>
    <%= javascript_include_tag "jsan/Asynapse/Emoticon" %>
    <%= javascript_include_tag "jsan/Widget/Lightbox" %>

    <% if @push_solution == "ipush" %>
      <%= javascript_include_tag "pjax/swfobject" %>
      <%= javascript_include_tag "pjax/pjax" %>
    <% elsif @push_solution == "juggernaut" %>
      <%= javascript_include_tag "juggernaut_javascript" %>
    <% end %>

    <%= javascript_include_tag "json" %>
    <%= javascript_include_tag "ipush" %>
    <%= javascript_include_tag "chatroom" %>
  </head>

  <body>

    <script type="text/javascript">
      Chatroom.PUSH_SOLUTION = <%= @push_solution.to_json %>
    </script>

    <% if @push_solution == "ipush" %>
      <script type="text/javascript">
          var iplink = new iPush2Link();
      </script>
    <% elsif @push_solution == "juggernaut" %>
    <%= flash_plugin([ "chat.#{@chatroom.id}" ]) %>
    <% end %>

    <div id="container">
        <div id="nav" class="x-layout-inactive-content">
            <ul>
                <% class_name = ( @me.is_guest? ) ? "signin-link" : "" %>
                <li><%= link_to (_ "Home"), { :controller => "chatroom" }, :class => class_name %></li>
                <li><%= link_to (_"Logout"), :controller=>'openid_account', :action=>'logout' %></li>
            </ul>
        </div>

        <div>
            <div id="main" class="x-layout-inactive-content">
                <%= yield %>
            </div>
            <div id="sidebar" class="x-layout-inactive-content">
                <%= render :partial => 'sidebar' %>
            </div>
        </div>
    <%= render :partial => "chatroom/dialog" %>
  </body>
</html>

